<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">
    <h2>Stored Values</h2>
    <h:form> 
  <h:outputLabel for="ajaxSpinner" value="Number of values : " />
        <p:outputPanel>
            <p:spinner id="ajaxSpinner" value="#{viewFeedsManagedBean.numFeeds}">
                <p:ajax update="feedTable" process="@this" action="#{viewFeedsManagedBean.refreshList}" />
            </p:spinner>
        </p:outputPanel>  
<p:dataTable id="feedTable" value="#{viewFeedsManagedBean.feeds}" var="entry">
	<p:column>
		<f:facet name="header">
			<h:outputText value="Apparent Power"></h:outputText>
		</f:facet>
		<div align="center">
			<h:outputText value="#{entry.field1}"></h:outputText>
		</div>
	</p:column>
	<p:column>
		<f:facet name="header">
			<h:outputText value="Rms Current"></h:outputText>
		</f:facet>
		<div align="center">
			<h:outputText value="#{entry.field2}"></h:outputText>
		</div>
	</p:column>	
</p:dataTable>
</h:form> 
</ui:composition>